package pkmn.move.indirectAction;

import java.util.Random;
import pkmn.Pokemon;
import pkmn.status.Status;
import pkmn.status.StatusEnum;

public class ApplyParalyzis extends IndirectAction{

    public void execute(Pokemon pokemon){
        if (pokemon.getStatus().equals(StatusEnum.paralyzis)){
            System.out.println(pokemon.getName() + " is already paralyzed!");
        }else if (pokemon.getStatus().equals(StatusEnum.none)){
            pokemon.setStatus(new Status(StatusEnum.paralyzis, new Random().nextInt(5) + 1));
            System.out.println(pokemon.getName() + " is paralyzed! It can't move!");
        }else
            System.out.println("But, it failed!");
    }
}
